package main

import "fmt"

type Vertex struct {
	Lat, Long float64
}

var m = map[string]Vertex{
	"Bell Labs": {
		40.68433, -74.39967,
	},
	"Google": {
		37.42202, -122.08408,
	},
}

func main() {
	m["Bell Labs"] = Vertex{
		40.68433, -74.39967,
	}
	fmt.Println(m)

	intMap[3] = "go"
	fmt.Println(intMap)

	delete(intMap, 3)
	fmt.Println(intMap)

	// 检测是否存在
	elem, ok := intMap[2]
	fmt.Printf("%s is %t\n", elem, ok)
	elem, ok = intMap[3]
	fmt.Printf("%s is %t\n", elem, ok)
}

var intMap = map[int]string{
	1: "hello",
	2: "world",
}
